package nuffzone;

import java.util.*;
import java.text.DateFormat;

public class Message{
	
	private String user;
	private String message;
	private Date date;
	
	public Message(String user, String message, Date date) {
				
		this.user = user;
		this.message = message;
		this.date = date;
	}


	public void setUser(String user){
		this.user = user;
	}	
	
	public String getUser(){
		return this.user;
	}
	
	public void setMessage(String message){
		this.message = message;
	}	
	
	public String getMessage(){
		return this.message;
	}
	
	public void setDate(Date date){
		this.date = date;
	}	
	
	public Date getDate(){
		return this.date;
	}
	
	public String getDateFormatted(){
		Date today; String dateOut; DateFormat dateFormatter;
		
		dateFormatter = DateFormat.getDateInstance(
		DateFormat.DEFAULT);
		today = this.date;
		dateOut = dateFormatter.format(today);
		return dateOut;
	}
	
}